home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu478.dms / pu478.adf / CONVERT / OS 1.3 / Convert.doc < prev    next >
Text File  |  1993-09-02  |  16KB  |  391 lines

  1.  
  2.  
  3.                       » » » » »  C O N V E R T  « « « « «
  4.  
  5.                         version 1.2, October 3th, 1992
  6.  
  7.                                  User Manual
  8.  
  9.         ***************************************************************
  10.  
  11.                                   Contents
  12.  
  13.                    1. Introduction - What does "Convert" ?
  14.                    2. Getting started
  15.                    3. Working with "Convert"
  16.                    4. Creating own conversion descriptions
  17.                    5. Error messages
  18.                    6. The shell version "Cvt"
  19.  
  20.  
  21.         ***************************************************************
  22.  
  23.  
  24.         1. Introduction
  25.  
  26.  
  27.         "Convert" is a powerful file conversion program. It covers the
  28.         application domain of all ASCII conversion tools between Amiga
  29.         and MS-DOS or any other computer system. This means, that file
  30.         conversion with "Convert" does NOT affect the physical format of
  31.         a file but only its contents. Physical conversion is not subject
  32.         of "Convert" and thus assigned to tools like "CrossDOS".
  33.  
  34.         "Convert" can be used to replace bytes or pairs of bytes in a
  35.         file by another byte or another pair of bytes or by nothing.
  36.         Therefore it can be used tasks as follows:
  37.  
  38.         - replacing TABs in an ASCII file with blank character(s)
  39.         - stripping controls in an ASCII file
  40.         - converting ASCII-files between Amiga and MS-DOS, MS-DOS and
  41.           Amiga, Amiga and Mac, Mac and Sun, Amiga and Sun etc.
  42.  
  43.         What are "conversion descriptions" ?
  44.  
  45.         All that "Convert" needs, is a set of "replacement records"
  46.         which it can apply to its input files. This set is in the
  47.         following called "conversion description".
  48.         You can create your individual conversion descriptions by
  49.         creating several "replacement records" with a text editor using
  50.         the simple syntax described in Chapter 4. These "records" are
  51.         stored to a conversion description file which can be parsed by
  52.         "Convert".
  53.  
  54.         The draft of specifying the conversion by a simple text file
  55.         makes "Convert" more powerful than any other conversion tool
  56.         and thus allows the application of "Convert" for almost all
  57.         conversion problems.
  58.  
  59.  
  60.         ***************************************************************
  61.  
  62.  
  63.         2. Getting started
  64.  
  65.  
  66.         Installation
  67.  
  68.         To install "Convert" double-click the "Install" icon. This short
  69.         shell script will copy the libraries required by "Convert" into
  70.         the LIBS: directory. The program needs
  71.  
  72.         - arp.library (v39.1),
  73.         - reqtools.library (v38.362 or higher) and
  74.         - intuisup.library (v4.5 or higher).
  75.         
  76.         Furthermore, you must have a directory from where "Convert" reads
  77.         its conversion description files. If this directory is not the
  78.         same as the one where "Convert" is placed, you must assign the
  79.         logical device "CVT:" to it.
  80.         If "Convert" starts, first it looks in the current directory for
  81.         conversion descriptions. If it cannot find any matching file
  82.         (with the extension ".cvt"), it tries to get files from "CVT:".
  83.         NOTE: If "Convert" cannot find any description files, it will
  84.         NOT work !
  85.  
  86.  
  87.         Starting "Convert"
  88.  
  89.         You can start "Convert" by entering its name in the shell or by
  90.         double-clicking its icon.
  91.         If the program can locate at least one conversion description,
  92.         it opens a window which contains the control panel of "Convert".
  93.         This panel consists of following elements:
  94.  
  95.         * Source file list *
  96.  
  97.         This list on the left side of the buttons displays the names of
  98.         all files to be converted. The names are shown without path
  99.         name, except if you select two files in different directories
  100.         with the same name. Then the whole path name is displayed.
  101.  
  102.         * Conversion list *
  103.  
  104.         This list on the right side of the buttons displays the names
  105.         of the conversion description files which "Convert" could locate
  106.         at the start. The currently selected conversion description file
  107.         is shown by a high-lighted selection. By default the first name
  108.         of the list is selected.
  109.  
  110.         * Button "Clear" *
  111.  
  112.         You can use this button for deleting the current contents of the
  113.         source file list. If the files in this list have not been
  114.         converted yet, you will be asked to confirm your decision.
  115.  
  116.         * Button "Add files..." *
  117.  
  118.         If you click this button, a file requester will appear. You can
  119.         then select the files which you want to convert by clicking on
  120.         the file names while holding the SHIFT key. In addition there are
  121.         buttons for selecting and de-selecting all files and for pattern
  122.         matching (absolutely great, Nico !).
  123.         Press the button "Ok" to add the selected files to the source file
  124.         list.
  125.  
  126.         * Button "Remove" *
  127.  
  128.         You can use this button for deleting the currently selected item
  129.         in the source file list. If the files in this list have not been
  130.         converted yet, you will be asked to confirm your decision.
  131.  
  132.         * Button "Start" *
  133.  
  134.         A click on this button starts the conversion process.
  135.  
  136.         * Button "About..." *
  137.  
  138.         Click this button to get short information about "Convert".
  139.  
  140.         * Button "Quit" *
  141.  
  142.         You can use this button for exiting "Convert". If the files in the
  143.         source file list have not been converted yet, you will be asked
  144.         to confirm your decision. You can also quit by clicking in the
  145.         close gadget of "Convert"'s window.
  146.  
  147.         * Cycle-gadget "Replace Original/Target Directory"
  148.  
  149.         This cycle-gadget can be used to toggle between the following two
  150.         modes:
  151.  
  152.         1. replacement mode
  153.         2. duplication mode
  154.  
  155.         The replacement mode is active, when the gadget shows the text
  156.         "Replace Original". Former versions of "Convert" (up to v1.12)
  157.         only provide this mode. In this mode "Convert" replaces the
  158.         original file with the converted version.
  159.         If you choose the duplication mode, a directory requester will
  160.         appear and you have to select a target directory, where "Convert"
  161.         will write the converted files. The name of the target directory
  162.         is then displayed within the cycle-gadget.
  163.  
  164.  
  165.         ***************************************************************
  166.  
  167.  
  168.         3. Working with "Convert"
  169.  
  170.  
  171.         When you have started "Convert" from the shell or from workbench,
  172.         it will open a window which contains a small control panel.
  173.         The source file list on the left side of the buttons is empty,
  174.         so the buttons "Clear" and "Start" are "ghosted".
  175.         Whenever you want to append files to the source file list, press
  176.         the button "Add files". A file requester will appear which allows
  177.         you to select the desired files. Press the "Ok" button to
  178.         append the files to the source file list.
  179.         If you do not want to overwrite the old files with the converted
  180.         versions, then you can specify a target directory for the
  181.         converted files by pressing the cycle-gadget at the botton of the
  182.         window. When you have chosen a target directory, its name will
  183.         be displayed within the gadget.
  184.         Before you start the conversion process, make sure you have
  185.         selected the correct conversion description in the list on the
  186.         right side of the buttons. The current description is shown in
  187.         the string gadget below the list.
  188.         The conversion process can be started by pressing the "Start"
  189.         button. "Convert" will open a window which gives you a simple
  190.         trace about the conversion.
  191.         If the conversion description contains no syntax errors, the
  192.         conversion should be performed without any problem. Otherwise
  193.         you have to correct the description file with a text editor.
  194.         At the end "Convert" informs you with a simple requester about
  195.         the success of the conversion process.
  196.         If there were no problems, you can return to the control panel.
  197.         Usually you will want to clear the source file list for the next
  198.         conversion procedure or to quit from "Convert".
  199.  
  200.  
  201.         ***************************************************************
  202.  
  203.  
  204.         4. Creating own conversion descriptions
  205.  
  206.  
  207.         A conversion description file consists of a set of replacement
  208.         records. Such a record describes how a byte or a pair of bytes
  209.         should be replaced by another byte or another pair of bytes or
  210.         by nothing.
  211.         The structure of a conversion description can thus be described
  212.         with the following grammar in EBNF:
  213.  
  214.         ConvDescr = { ReplRec }.
  215.         ReplRec = Byte [ "," Byte ] "->" [ Byte [ "," Byte ] ].
  216.         Byte = digit { digit }.
  217.  
  218.         digit = "0"|"1"|"2"|..|"9".
  219.  
  220.         Each replacement record must be written in a separate line.
  221.  
  222.         Furthermore a conversion description may contain comments which
  223.         are written like in the programming languages Ada or Eiffel
  224.         (beginning with "--", until end of line). The comments must NOT
  225.         occur after a replacement record.
  226.  
  227.         Example:
  228.  
  229.         -- this is a short example of a conversion description
  230.  
  231.         --replace the byte pair (14,37) with the byte 121
  232.         14,37->121
  233.         --replace the byte 154 with the byte 254
  234.         154->254
  235.         --strip the byte pair (31,201)
  236.         31,201->
  237.  
  238.         --the following lines are incorrect:
  239.         14,37,->12
  240.         ->13
  241.         20->41 --this comment does not belong here !
  242.  
  243.         (end of file)
  244.  
  245.  
  246.         ***************************************************************
  247.  
  248.  
  249.         5. Error Messages
  250.  
  251.  
  252.         "Convert" distinguishes between internal and user errors.
  253.  
  254.         Internal errors are reported by a short output in the shell
  255.         window or a requester with the title "FATAL ERROR". If an
  256.         internal error occurs, the reason may be lack of memory. The
  257.         execution of "Convert" is immediately terminated and you have
  258.         to increase the free memory size by quitting from another
  259.         application before restarting "Convert".
  260.         There exists one special internal error which is raised, if
  261.         "Convert" cannot find any conversion description files. This
  262.         error is named
  263.  
  264.         "Cannot find a conversion description ! - No conversion possible."
  265.  
  266.  
  267.         User errors are reported in a requester named "Information".
  268.         Errors of this kind may occur during a conversion process.
  269.         In this case "Convert" will stop the process and return to the
  270.         control panel. The user errors are listed below.
  271.  
  272.         "Error in conversion description or description file not found"
  273.  
  274.         This error may occur at the beginning of the conversion process
  275.         when "Convert" tries to open and to parse the current
  276.         conversion description file.
  277.         Since the list of description files is created at the start of
  278.         "Convert", another task may have removed the requested file.
  279.         Otherwise a syntax error in the file has been encountered which
  280.         must be corrected before you restart the conversion process.
  281.  
  282.         "File not found or conversion of empty file attempted"
  283.  
  284.         This error may occur during the conversion process, when
  285.         "Convert" cannot open a source file. Another task may have
  286.         removed the file between the selection of the file and the
  287.         beginning of the conversion process.
  288.  
  289.         "Could not get/set file date"
  290.  
  291.         This message appears if the handler process of the device from
  292.         which the source files are read does not understand the SET_DATE
  293.         command. "Convert" tries to save the old date of a file, since
  294.         only the file structure should be changed.
  295.         If the device driver of your harddisk does not support date
  296.         setting, then try the conversion with another device, i.e. RAM:.
  297.  
  298.         "Cannot create temporary file"
  299.  
  300.         In general "Convert" does not save the converted file directly
  301.         over the original file, but creates a temporary file in the same
  302.         directory where the original file is located. If a write-protected
  303.         file with the same name ("CvtTmp_<task address>") exists in this
  304.         directory ,this message tells you that "Convert" will save the
  305.         converted file directly over the original file.
  306.  
  307.         "Cannot write converted file"
  308.  
  309.         If one of the source files is opened for output by another
  310.         task during the conversion process, this error will be reported.
  311.  
  312.         "Cannot lock target directory"
  313.  
  314.         This message can only appear in duplication mode. It indicates
  315.         that "Convert" could not get read access to the specified target
  316.         directory. A possible reason is that there is another task that
  317.         has exclusive (write) access to the directory.
  318.  
  319.         "Internal overflow: too many subdirectories"
  320.  
  321.         This message can only appear in duplication mode. It indicates 
  322.         then the path name of a source file to be converted contains more
  323.         than 20 subdirectory names.
  324.  
  325.  
  326.         ***************************************************************
  327.  
  328.  
  329.         6. The shell version "Cvt"
  330.  
  331.  
  332.         This program is a reduced version of "Convert". It does not
  333.         provide a graphical user interface but accepts all parameters
  334.         from the shell.
  335.         Therefore "Cvt" does not need "intuisup.library" and "reqtools.
  336.         library", but it still needs "arp.library" for the pattern
  337.         matching and command line parsing.
  338.  
  339.         If you call "Cvt" without any parameters it will print the
  340.         following short description:
  341.  
  342.         »» Convert «« conversion utility v1.2 for AmigaDOS
  343.         Copyright (C) 1992 by Rainer Koppler
  344.  
  345.         USAGE: Cvt "FILES" <file> { <file> }
  346.                    ("DESCRIPTION"|"DSC") <ConversionDescription>
  347.                    [("TARGET"|"TRG") <TargetDirectory>]
  348.                    ["QUIET"]
  349.  
  350.         If you call "Cvt" with the parameter "?", it will prompt you with
  351.         the following AmigaDOS command template:
  352.  
  353.         FILES/...,DESCRIPTION=DSC/K/A,TARGET=TRG/K,QUIET=Q/S
  354.  
  355.         You then have to enter an argument list according to this template
  356.         or you can enter "?" to get the brief description as shown above.
  357.  
  358.         Description of the parameters:
  359.  
  360.         The parameter represented by the keyword FILES consists of a list
  361.         of names. A name can be any valid AmigaDOS file name or a pattern
  362.         containing AmigaDOS or ARP wildcards. All files in this list will
  363.         be converted by "Cvt". The keyword FILES may be omitted.
  364.  
  365.         The parameter with the keyword DESCRIPTION (abbreviated as DSC)
  366.         may not be omitted. It specifies the file name of the conversion
  367.         description (full path name). Note that also the keyword may not
  368.         be omitted.
  369.  
  370.         The parameter TARGET (abbreviated as TRG) is optional. If you
  371.         specify it, "Cvt" will write the converted files to the given
  372.         directory (see "duplication mode", Chapter 2). Note that also
  373.         the keyword may not be omitted.
  374.  
  375.         If you wish "Cvt" to produce no output you must specify the
  376.         switch QUIET. It may be abbreviated as "Q".
  377.  
  378.  
  379.         ***************************************************************
  380.  
  381.  
  382.         If you find any bugs or you have any ideas how to improve this
  383.         this product, then contact me:
  384.  
  385.               ///   Rainer Koppler
  386.              ///    Stelzhamerstraße 9
  387.         \\\ ///     A-4623 Gunskirchen
  388.          \\X//      Austria/Europe
  389.  
  390.         internet: rainer@soft.uni-linz.ac.at
  391.